home *** CD-ROM | disk | FTP | other *** search
- /*
- * FuzzyInit.c
- * Linda McLennan
- * COPYRIGHT © 1989 Ventana Software
- */
-
- #include "BWit.h"
- #include "Fuzzy.h"
-
- FuzzyInit( tDataPtr, refCon )
-
- ToolDataPtr tDataPtr;
- Handle *refCon;
-
- {
- MenuHandle fuzzyMenu;
- FuzzyDataPtr fzDataPtr;
-
- /* set options */
- tDataPtr->cursorType = resourceCursor;
- tDataPtr->symmetry = autoSymmetry;
- tDataPtr->autoPaint = noAutoPaint;
- tDataPtr->usesScratch = false;
- tDataPtr->usesConstrain = true;
- tDataPtr->changeFillPat = false;
-
- /* check if first time called */
- if ( *refCon == nil )
- {
- /* allocate space for globals */
- *refCon =
- NewHandle( sizeof ( FuzzyData ) );
-
- /* get the menu, detach it */
- /* and save the handle */
- if ( *refCon != nil )
- {
- fuzzyMenu = GetMenu( tDataPtr->toolID );
- if ( fuzzyMenu != nil )
- {
- HNoPurge((Handle)fuzzyMenu);
- DetachResource((Handle)fuzzyMenu);
- }
-
- HLock( *refCon );
- fzDataPtr = (FuzzyDataPtr)**refCon;
- fzDataPtr->theMenu = fuzzyMenu;
- fzDataPtr->whichEffect = fuzzy;
- fzDataPtr->brushSize = 16;
- HUnlock( *refCon );
- }
- }
- }
-